package com.prik.command.commands;

import com.prik.command.Command;
import com.prik.command.products.Light;

/**
 * 打开电灯的命令
 **/
public class LightOffCommand implements Command {

    Light light;

    public LightOffCommand(Light light) {
        this.light = light;
    }

    @Override
    public void execute() {
        light.off();
    }

    @Override
    public void undo() {
        light.on();
    }
}